<?php
/**
 * The following variables are available in this template:
 * - $this: the CrudCode object
 */
?>
<div class="view">

	<?php
	if (is_array($this->tableSchema->primaryKey))
	{
		echo "\t<b><?php echo CHtml::encode(";
		$sep = '';
		foreach ($this->tableSchema->primaryKey as $key)
		{
			echo $sep . "\$data->getAttributeLabel('$key')";
			$sep = '." ".';
		}
		echo "); ?>:</b>\n";

		echo "\t<?php echo CHtml::link(CHtml::encode(";
		$sep = '';
		foreach ($this->tableSchema->primaryKey as $key)
		{
			echo $sep . "\$data->$key";
			$sep = '."::".';
		}
		echo "), array('view', 'id'=>array(";
		$sep = '';
		foreach ($this->tableSchema->primaryKey as $key)
		{
			echo $sep . "'$key'=>\$data->$key";
			$sep = ', ';
		}
		echo "))); ?>\n\t<br />\n\n";
	}
	else
	{
		echo "\t<b><?php echo CHtml::encode(\$data->getAttributeLabel('{$this->tableSchema->primaryKey}')); ?>:</b>\n";
		echo "\t<?php echo CHtml::link(CHtml::encode(\$data->{$this->tableSchema->primaryKey}), array('view', 'id'=>\$data->{$this->tableSchema->primaryKey})); ?>\n\t<br />\n\n";
	}
	$count = 0;
	foreach ($this->modelTableSchema->columns as $column)
	{
		if ($column->isPrimaryKey)
			continue;
		if (++$count == 7)
			echo "\t<?php /*\n";
		echo "\t<b><?php echo CHtml::encode(\$data->getAttributeLabel('{$column->name}')); ?>:</b>\n";
		echo "\t<?php echo CHtml::encode(\$data->{$column->name}); ?>\n\t<br />\n\n";
	}
	if ($count >= 7)
		echo "\t*/ ?>\n";
	?>

</div>